<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--编辑人员信息页面-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑人员信息</title>
<link href="css/style2.css" rel="stylesheet" type="text/css" />

</head>

<body>

	<div class="formbody">

		<div class="formtitle">
			<span>添加用户</span>
		</div>
		<form action="" name="myform">
			<ul class="forminfo">
				<li><label>真实姓名：</label><input name="realName" type="text"
					class="dfinput" /></li>
				<li><label>用户账户：</label><input name="userName" type="text"
					class="dfinput" /><i>请填写用户登陆账户</i></li>
				<li><label>密码：</label><input id="password" name="password"
					type="password" class="dfinput" /><i>请输入用户密码</i></li>
				<li><label>确认密码：</label><input id="password2" name="password2"
					type="password" class="dfinput" onkeyup="validate()" /><i
					id="tishi">请再次确认密码</i>
				<%-- <span id="tishi"></span> --%></li>
				<ul style="float: left; display: inline">
					<li style="display: inline"><input name="" type="submit"
						class="btn" value="确认" onclick="sure()" /></li>
					<li style="display: inline"><a href="AccountManagement.html"
						target="rightFrame" /> <label>&nbsp;</label> <input name=""
						type="submit" class="btn" value="取消" onclick="noSure()" /></li>
				</ul>
			</ul>
		</form>
	</div>
	<script>
		function validate() {
			var pwd1 = document.getElementById("password").value;
			var pwd2 = document.getElementById("password2").value;
			if (pwd1 == pwd2) {
				document.getElementById("tishi").innerHTML = "<font color='green'>两次密码相同</font>";
				document.getElementById("submit").disabled = false;
			} else {
				document.getElementById("tishi").innerHTML = "<font color='red'>两次密码不相同</font>";
				document.getElementById("submit").disabled = true;
			}
		}
		function sure() {
			document.myform.action = "Base_User_addPersonnel";
			document.myform.submit();
		}
		function noSure() {
			document.myform.action = "Base_User_noAddPersonnel";
			document.myform.submit();
		}
	</script>
</body>
</html>
